package ma.ensao.evalmetrics.controller.metrics;

import java.io.File;
import java.io.IOException;

import ma.ensao.evalmetrics.model.MHF;
import ma.ensao.evalmetrics.util.javaProjects.MHFMetric;
/*
* Calcule l'encapsulation
* MHF repr�sente la moyenne des m�thodes cach�s (private) par rapport � tous les m�thodes du syst�me.
*/

public class MHFManager {
	private MHF mhf=new MHF();
	double nmbre;
	private int nbMethods=0;
	
	public MHF read(File file) throws IOException {
		    MHFMetric mM = new MHFMetric(file);
		    setNmbre(mM.getMhf());
		    this.setNbMethods(mM.getNbMethods());
		    mhf.setNmbre(getNmbre());
		    mhf.setNbMethods(getNbMethods());
			return mhf;
	}
	public MHF getMhf() {
		return mhf;
	}
	public void setMhf(MHF mhf) {
		this.mhf = mhf;
	}
	public double getNmbre() {
		return nmbre;
	}
	public void setNmbre(double nmbre) {
		this.nmbre = nmbre;
	}
	public int getNbMethods() {
		return nbMethods;
	}
	public void setNbMethods(int nbMethods) {
		this.nbMethods = nbMethods;
	}
}